import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI) // 注册element-ui
import '../../lib/lib'; // 公用库
import routerFilter from '@/lib/routerFilter.js'
import i18n from '../../../public/static/i18n/i18n'
import store from './store'
import { done } from 'nprogress'

router.beforeEach((to, from, next) => {
  routerFilter(to, from, next)
})

router.afterEach(() => {
  done()
})

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
